package com.facebook.app.shared.facebookData;

import java.io.Serializable;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.InheritanceStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class FacebookData implements Serializable {

	private static final long serialVersionUID = -7211334307084341109L;

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    @SuppressWarnings("unused")
    private String encodedKey;

	@Persistent
	private String name;

	@Persistent
	private long id;
	
	public FacebookData(String name, long id) {
		this.name = name;
		this.id = id;
	}
	
	protected FacebookData() {}

	public String getName() {
		return name;
	}
	
	public long getId() {
		return id;
	}
	
}
